import { createApp } from 'vue'
// import "./mock"
// import './style.css'
import { setupProdMockServer } from './modules/mock';
import App from './App.vue'
import {router} from "./router/index"
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import svgIcon from "@/components/SvgIcon.vue";
import 'virtual:svg-icons-register'
const app = createApp(App)
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

if (import.meta.env.MODE === 'development') {
  setupProdMockServer();
}
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(router).use(pinia).component('svg-icon', svgIcon).mount('#app')